<%-- 
    Document   : Delete
    Created on : Jun 10, 2013, 12:01:29 PM
    Author     : Huong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
         <%!
            String pName; 
        %>
           
        <jsp:useBean id = "project" class="myBean.Project"/>
        <p>
            Do you really want to delete project 
            <%
                out.println(pName = request.getParameter("x"));
            %> ?
        </p>
        <%
            out.println("<input type=\"submit\" onclick= \"location.href='Delete.jsp?x=1&y="+pName+"';\" value=\"Yes\" /> ");
        %>
        <input type="submit" onclick= "location.href = 'studentList.jsp';" value="No"/>
        
    </body>
    <%
            if(request.getParameter("y").equalsIgnoreCase("1")){
                project.delete(pName);
                RequestDispatcher dispatcher = request.getRequestDispatcher("/project.jsp");
            dispatcher.forward(request, response);
            }
    %>
</html>
